package team.szm.scd.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import team.szm.scd.database.entity.InspectionType;
import team.szm.scd.database.mapper.InspectionTypeMapper;
import team.szm.scd.service.interfaces.IInspectionService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class InspectionServiceImpl implements IInspectionService {
    @Resource
    InspectionTypeMapper mapper;

    @Override
    public List<InspectionType> searchInspectionType(String name) {
        QueryWrapper<InspectionType> wrapper = new QueryWrapper<>();
        wrapper.like("iname", name);
        return mapper.selectList(wrapper);
    }

    @Override
    public List<InspectionType> fromCaseId(String caseId) {
        return mapper.fromCaseId(caseId);
    }
}
